package com.organize.context;

import com.organize.configure.OrganizeComponentProperties;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-10-17 17:14
 **/
public class OrganizeComponentWebApiCondition implements Condition {

    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        return OrganizeComponentProperties.getEnableWebApi(context.getEnvironment());
    }
}
